#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    static void switchUtf8(const QString &source,QByteArray &byteArray);

    static void switchGbk(const QString &source,QByteArray &byteArray);
    static void switchHex(const QString &source,QByteArray &byteArray);
private slots:
    void on_pushButton_clicked();

    void on_radioButton_u_clicked(bool checked);

    void on_radioButton_g_clicked(bool checked);

    void on_textEdit_in_textChanged();

    void on_radioButton_hex_clicked(bool checked);

private:
    Ui::MainWindow *ui;

    void (*funcSwitch)(const QString &source,QByteArray &byteArray);
};
#endif // MAINWINDOW_H
